﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Mantcliente.aspx.cs" Inherits="Bastanteo.Paginas.Mantcliente" %>
<%@ Register Src="../Controles/MenuPrincipal.ascx" TagName="MenuPrincipal" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Mantenimiento Clientes</title>
    <link href="../Estilos/General.css" type="text/css" rel="stylesheet" />
    <script src="../Scripts/funciones.js" type="text/javascript"></script>
    <script language="javascript">
        function Validar() {
            document.frmMain.hidAccion.value = "B";
            document.frmMain.submit();
        }

        function Eliminar(id_Tienda) {
            document.frmMain.hididtienda.value = id_Tienda;
            document.frmMain.hidAccion.value = "E";
            document.frmMain.submit();
            return;
        }
        function Modificar(id_Tienda) {
            window.location = 'MantTienda.aspx?Accion=M&IdTienda=' + id_Tienda + '&s=' + document.frmMain.s.value + '';
            return;
        }
  
    </script>
</head>
<body>
    <form id="frmMain" runat="server">
    <input type="hidden" runat="server" id="hidAccion"     name="hidAccion" value="" />
    <input type="hidden"  runat="server" id="hidMensaje" name="hidMensaje" value="" />
    <input type="hidden" runat="server" id="hididtienda"   name="hididtienda" value="" />
    <input type="hidden" name="s" id="s" value='<%=Request.QueryString["s"]%>'/>
    
    <div>
        <uc1:MenuPrincipal ID="mnuPrincipal" runat="server" />    
    </div>
    <br />
    <br />
    <table width="98%" cellpadding="0" cellspacing="0" align="center">
	    <tr align="center">		
		    <td class="titulon" valign="middle">Mantenimiento de Clientes</td>
	    </tr>			
    </table>
    <br />
    <table align="center" border="0" cellpadding="1" cellspacing="1" >
        <tr>
            <td class="tdlabelForm">Codigo de Cliente&nbsp;:&nbsp;
                <asp:TextBox ID="txtidCliente" runat="server" CssClass="tdlabelForm" Width="80px" MaxLength="5" onkeydown="eventoSoloNumeros();"  ></asp:TextBox> &nbsp;&nbsp;&nbsp;
            </td>
            <td class="tdlabelForm">RUC&nbsp;:&nbsp;
                 <asp:TextBox ID="txtRuc" runat="server" style="text-transform :uppercase"  CssClass="tdlabelForm" Width="150px"></asp:TextBox>&nbsp;&nbsp;
            </td>
            <td class="tdlabelForm">
                <asp:Button ID="BtnBuscar" runat="server" CssClass="btnout" OnClientClick="return Validar();"
                    Text="Buscar" />&nbsp;
                </td>
        </tr>
        <tr>
            <td colspan =2 class="tdlabelForm"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Razón Social&nbsp;:&nbsp;
                <asp:TextBox ID="txtRazon" runat="server" style="text-transform :uppercase"  CssClass="tdlabelForm" Width="435px"></asp:TextBox>&nbsp;&nbsp;
            </td>
             <td class="tdlabelForm">
                    <asp:Button ID="BtnIngresar" runat="server" Text="Ingresar Nuevo Cliente" Width="150px" CssClass="btnout" />
            </td>
        </tr>
    </table>
        <br />
        <table id="tblGrilla" align="center" runat="server" >
        <tr >
        <td align="center" class="tABLAxml" >
          <asp:GridView ID="GrdWLista" runat="server" AutoGenerateColumns="False" CellPadding="0" Width="800px" AllowPaging="True"  >
                <HeaderStyle HorizontalAlign="Center" Height="25px" CssClass="tituloXML"></HeaderStyle>
                <Columns>
                    <asp:BoundField HeaderText="RUC" DataField="ruc">
                        <ItemStyle CssClass="celdaXML" HorizontalAlign="Center" Width="200px"/>
                    </asp:BoundField>
                    <asp:BoundField HeaderText="Razón Social" DataField="ClienteRazonSocial" >
                        <ItemStyle CssClass="celdaXML" HorizontalAlign="Left" Width="400px" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="Tipo Empresa" DataField="ClienteTipoEmpresa">
                        <ItemStyle CssClass="celdaXML" HorizontalAlign="Center" Width="130px" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="Inicio Operaciones" 
                        DataField="ClienteInicioOperaciones" >
                        <ItemStyle CssClass="celdaXML" HorizontalAlign="Center" Width="180px" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="Cantidad Empresa" DataField="ClienteCantEmpresa">
                        <ItemStyle CssClass="celdaXML" HorizontalAlign="Center" Width="180px" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Acci&#243;n">
                    <HeaderStyle HorizontalAlign="Center" CssClass="tituloXML"></HeaderStyle>
				        <ItemStyle CssClass="celdaXML" VerticalAlign="Middle" HorizontalAlign="Center" Width="100px" ></ItemStyle>
				        <ItemTemplate>					
				                &nbsp;
						        <img alt="Eliminar" style="cursor:hand" src="../imagenes/eliminar.gif" border="0" onclick="javascript:Eliminar('<%#Eval("IdPlaza")%>');">
						        &nbsp;&nbsp;
						        <img alt="Modificar" style="cursor:hand" src="../Imagenes/editar.gif" border="0" onclick="javascript:Modificar('<%#Eval("IdPlaza")%>');">
						        &nbsp;
				        </ItemTemplate>
				        <ControlStyle Width="20%" />
                    </asp:TemplateField>               
                </Columns>
                <RowStyle BackColor="#E3EAEB" />
                <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle CssClass="celdaXML" BorderWidth="0px" HorizontalAlign="Right" BorderStyle="None" Font-Underline="True" />
                <HeaderStyle CssClass="tituloXML" />
                <EditRowStyle BackColor="#7C6F57" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
           </td>
          </tr>
          </table>
          <table  align="center"> 
          <tr>
		        <td align="center" style="height: 15px"><asp:label id="lblMensaje" runat="server" CssClass="tdlabelForm" ></asp:label></td>
          </tr>  
         </table>
    </form>
</body>
</html>
